From 230388c7391c9b436b3ea3f3265c3c815e2061cd Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 12 Jun 2002 09:16:51 +0000 Subject: [PATCH] (comint-send-input): Properly handle empty and no-newline input regions. --- lisp/comint.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index d6247dd14a6..9d31e975789 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -1446,7 +1446,7 @@ Similarly for Soar, Scheme, etc." (let ((beg (marker-position pmark)) (end (if no-newline (point) (1- (point))))) - (when (not (> beg end)) ; handle a special case + (when (> end beg) ;; Set text-properties for the input field (add-text-properties beg end @@ -1461,7 +1461,7 @@ Similarly for Soar, Scheme, etc." ;; `boundary' field to make cursor movement between input ;; and output fields smoother. (put-text-property beg end 'field 'input))) - (unless comint-use-prompt-regexp-instead-of-fields + (unless (or no-newline comint-use-prompt-regexp-instead-of-fields) ;; Cover the terminating newline (add-text-properties end (1+ end) '(rear-nonsticky t -- 2.30.2